﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EnhancedWebControls;

namespace EwcControlTest
{
    public partial class Scratchpad : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!Page.IsPostBack)
            {
                ImqNavBar.DataSource = GetUserNavigation();
                ImqNavBar.DataBind();
            }
        }
        private List<NavBarMenuItem> GetUserNavigation()
        {
            List<NavBarMenuItem> rval = new List<NavBarMenuItem>();
            rval.Add(new NavBarMenuItem { MenuText = "Home", MenuID = 1, NavigateUrl = "~/Default.aspx", MenuDescription = "IMQ Home Page", ParentID = 0, HideInMenu = false, OpenInNewWindow = false });
            rval.Add(new NavBarMenuItem { MenuText = "New Request", MenuID = 2, NavigateUrl = "~/NewRequest.aspx", MenuDescription = "Submit a new IMQ Request", ParentID = 0, HideInMenu = false, OpenInNewWindow = false });
            rval.Add(new NavBarMenuItem { MenuText = "Search Requests", MenuID = 3, NavigateUrl = "~/SearchRequests.aspx", MenuDescription = "Search existing IMQ Requests", ParentID = 0, HideInMenu = false, OpenInNewWindow = false });

                rval.Add(new NavBarMenuItem { MenuText = "Admin", MenuID = 4, NavigateUrl = null, MenuDescription = "IMQ Administration", ParentID = 0, HideInMenu = false, OpenInNewWindow = false });
                rval.Add(new NavBarMenuItem { MenuText = "Users", MenuID = 5, NavigateUrl = "~/Admin/UserAdmin.aspx", MenuDescription = "Add, Remove and Modify IMQ Users", ParentID = 4, HideInMenu = false, OpenInNewWindow = false });
                rval.Add(new NavBarMenuItem { MenuText = "Heirarchy", MenuID = 6, NavigateUrl = "~/Admin/Hierarchy.aspx", MenuDescription = "Modify the IMQ Approver Heirarchy", ParentID = 4, HideInMenu = false, OpenInNewWindow = false });
                rval.Add(new NavBarMenuItem { MenuText = "Lookup Tables", MenuID = 8, NavigateUrl = "~/Admin/LookupTables.aspx", MenuDescription = "Projects Table, Status Table, etc...", ParentID = 4, HideInMenu = false, OpenInNewWindow = false });

            return rval;
        }
    }
}